package cn.xxi.ai.application.dto;

import dev.langchain4j.model.output.FinishReason;
import lombok.Getter;

import java.time.LocalDateTime;

@Getter
public class Finished extends FinishedEvent {

    /** 输入 token 用量 */
    private final int inputTokenUsage;

    /** 输出 token 用量 */
    private final int outputTokenUsage;

    /** 结束原因 */
    private final FinishReason finishReason;

    public Finished(int inputTokenUsage, int outputTokenUsage, FinishReason finishReason, Status status, String error, LocalDateTime startedAt) {
        super(status, error, startedAt);
        this.inputTokenUsage = inputTokenUsage;
        this.outputTokenUsage = outputTokenUsage;
        this.finishReason = finishReason;
    }
}
